Repository navigation
SG-47353 Run the tests with the shared tk-ci-tools test jobs - #471
julien-lang wants to merge 9 commits into
Conversation
Replace the local OS x Python test matrix with build-pipeline.yml, listing this repository's own Python versions in run_tests_extra_parameters. Each one runs on the -latest runner images, except Python 3.9 on Linux. Points tk-ci-tools at its feature branch for testing; revert the ref to master before merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Python versions are the same as the tk-ci-tools defaults, so there is nothing to override. Keep has_unit_tests explicit to point at the shared test defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Otherwise the tests import the shotgun_api3 bundled with tk-core instead of this repository's code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #471 +/- ##
=======================================
Coverage 81.65% 81.65%
=======================================
Files 7 7
Lines 1935 1935
=======================================
Hits 1580 1580
Misses 355 355
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The shared CI job silently skips both mocked client test classes because it lacks server URL configuration, leaving unit-test coverage disabled alongside live-site tests.
1 open issue
What changed in this PR
This PR migrates Python API testing to shared tk-ci-tools jobs, removing the locally maintained OS × Python matrix. It remains an experimental integration with tk-ci-tools#88 and explicitly acknowledges reduced live-site coverage.
Changes:
- Enables shared tests for four Python versions across Linux, macOS, and Windows.
- Installs repository test requirements and disables tk-core loading so tests use this repository’s API.
- Points to the shared-template feature branch and removes the local test-job template.
| File | Description |
|---|---|
azure-pipelines.yml |
Enables and configures shared test jobs using the experimental tk-ci-tools branch. |
azure-pipelines-templates/run-tests.yml |
Removes local test execution, live-site setup, cleanup, and reporting steps. |
Review effort: Balanced
| # runner images), defined in internal/run-tests.yml of tk-ci-tools. Review | ||
| # those defaults when they change, and override them with | ||
| # run_tests_extra_parameters if this repository needs something else. | ||
| has_unit_tests: true |
Use the new tk-ci-tools options to restore what the removed test template did: the test configuration, the site credentials with secrets mapped explicitly, a test user per OS and Python version, the Windows certificate import, the pytest reruns and the test project cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the type checking job first so it is not lost after the test jobs, set has_ui_resources before the test parameters, and list the test dependencies in run_tests_extra_parameters with the other test settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tk-ci-tools changes are merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
The shared job also installs a Qt wrapper and tk-toolchain, which the Python API tests don't need.
Can we add a flag so tk-ci-tools won't install those dependencies? Maybe something telling that requires_tk_dependencies (python-api, jira bridge are not TK and don't require toolchain and Qt). This could impact CI time per runner.
Rename run_tests_extra_parameters and its keys to the names of the tk-ci-tools follow-up, and set toolkit to false: this repository is not a Toolkit component, so the tests need no Qt wrapper, tk-toolchain or tk-core. Point tk-ci-tools at the follow-up branch for testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Follow the tk-ci-tools rename of the run_tests_parameters key. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Child of the tk-ci-tools pull request shotgunsoftware/tk-ci-tools#90 (SG-47353).
Run the tests with the shared tk-ci-tools test jobs instead of a local copy of the OS × Python matrix. This relies on shotgunsoftware/tk-ci-tools#88 (merged), which defaults every platform to the
-latestrunner images and adds the per-repository test overrides, and shotgunsoftware/tk-ci-tools#90, which adds thetoolkitflag and therun_tests_parameterskey names used here.Changes
azure-pipelines.ymlcallsbuild-pipeline.ymlwithhas_unit_testson and keeps the default platforms (Python 3.9, 3.10, 3.11, 3.13). Each one runs on Linux, macOS and Windows with the-latestrunner images, except Python 3.9 on Linux which usesubuntu-24.04.run_tests_parameterssetstoolkit: false, because the Python API is not a Toolkit component: no Qt wrapper, tk-toolchain or tk-core. With tk-core, the tests would import theshotgun_api3bundled with tk-core instead of this repository's code.run_tests_parameters.pip_requirements(--requirement=tests/requirements.txt).has_ui_resources: falsecomes before the test parameters.run_tests_parametersandpost_tests_steps:pre_stepscreatestests/configfromtests/example_config, and imports the Amazon root certificate on Windows.envsets theSG_*variables: the test site and its secrets, and a human user and project per job, named after the OS and Python version ($(tk_ci_os_name)and$(tk_ci_python_version)), as before.pytest_argskeeps the reruns (--reruns 1 --reruns-delay 2).refpoints at the branch of SG-47353 Add a toolkit flag and shorten the test override keys tk-ci-tools#90 for testing.Testing
Do not merge as is: revert the tk-ci-tools
reftorefs/heads/masteronce shotgunsoftware/tk-ci-tools#90 is merged.🤖 Drafted with Claude Code and GitHub Copilot